package com.ruoqing.core.config;

/**
	* @author YaoXian
	* @title: ServiceFeignConfiguration
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 核心模块 - OpenFeign客户端RPC远程调用配置类
	* @date 2020-11-22 13:58
	*/
import feign.Request;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ServiceFeignConfiguration {
		
		@Value("${service.feign.connectTimeout:60000}")
		private int connectTimeout;
		
		@Value("${service.feign.readTimeOut:60000}")
		private int readTimeout;
		
		@Bean
		public Request.Options options() {
				return new Request.Options(connectTimeout, readTimeout);
		}
}